//
//  CJTextField.m
//  KEREN
//
//  Created by MW on 2023/5/8.
//

#import "CJTextField.h"

@implementation CJTextField
//- (void)deleteBackward
//{
//    [super deleteBackward];
//    if ([self.cj_delegate respondsToSelector:@selector(cjTextFieldDeleteBackward:)]) {
//        [self.cj_delegate cjTextFieldDeleteBackward:self];
//    }
//}

- (void)deleteBackward
{
    if ([self.text length] == 0){
        if ([self.cj_delegate respondsToSelector:@selector(cjTextFieldDeleteBackward:)]) {
            [self.cj_delegate cjTextFieldDeleteBackward:self];
        }
    }
    [[NSNotificationCenter defaultCenter] postNotificationName:@"deleteTextFlied" object:nil];

    [super deleteBackward];

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
